package org.example.myleet.p675;

import org.example.myleet.Utils.Assert;
import org.example.myleet.Utils.JsonUtils;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(6 == solution.cutOffTree(JsonUtils.parse("[[1,2,3],[0,0,4],[7,6,5]]", List.class)));
        Assert.isTrue(6 == solution.cutOffTree(JsonUtils.parse("[[2,3,4],[0,0,5],[8,7,6]]", List.class)));
        Assert.isTrue(-1 == solution.cutOffTree(JsonUtils.parse("[[1,2,3],[0,0,0],[7,6,5]]", List.class)));
        Assert.isTrue(8 == solution.cutOffTree(JsonUtils.parse("[[3,2,4],[0,0,5],[8,7,6]]", List.class)));
        Assert.isTrue(14 == solution.cutOffTree(JsonUtils.parse("[[2,3,8],[0,0,5],[4,7,6]]", List.class)));
    }
}
